package com.sunwayworld.basemodule.business.pjtask.resource.impl;

import com.alibaba.fastjson.JSONObject;
import com.sunwayworld.basemodule.business.pjtask.resource.LimsPjFolderResource;
import com.sunwayworld.basemodule.business.pjtask.service.LimsPjFolderService;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@LogModule("普检项目表")
@RestController
@GikamBean
public class LimsPjFolderResourceImpl implements LimsPjFolderResource {

    @Autowired
    private LimsPjFolderService limsPjFolderService;

    @Override
    public LimsPjFolderService getService() {
        return limsPjFolderService;
    }

    @Log(value = "新增普检项目表", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public JSONObject folderSubmit(RestJsonWrapperBean wrapperBean) {
        return getService().folderSubmit(wrapperBean);
    }

    @Override
    public JSONObject folderStop(RestJsonWrapperBean wrapperBean) {
        return getService().folderStop(wrapperBean);
    }
}
